package com.huiminpay.merchant.convert;

import com.huiminpay.merchant.dto.MerchantDTO;
import com.huiminpay.merchant.entity.Merchant;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 有点儿意思
 * @Description:
 */
@Mapper
public interface MerchantCovert {

    MerchantCovert INSTANCE = Mappers.getMapper(MerchantCovert.class);
    /**
     * mapStruct
     * dto转成entity
     * @param merchantDTO dto对象
     * @return  Merchant实体
     */
    Merchant dto2Entity(MerchantDTO merchantDTO);

    /**
     * mapStruct
     * entity转成dto
     * @param merchant merchant对象
     * @return dto对象
     */
    MerchantDTO entity2Dto(Merchant merchant);


}
